<include file="Public/Header" />
<div class="layout margin-top">
	<div class="container">
		<div class="line">
			<div class="x3">
				<include file="Public/MemberLeft" />
			</div>
			<div class="x9 padding-left">
				<table class="table table-bordered">
					<tr class="bg">
						<td>视频名称</td>
						<td>所属分类</td>
						<td>视频状态</td>
						<td>上传时间</td>
						<td>操作项目</td>
					</tr>
					<?php foreach ($data as $key => $ret): ?>
						<tr>
							<td>
								<a href="{:U('Videos/info',array('id'=> $ret['video_id']))}" target="_blank">
									<?php echo $ret['video_title']; ?>
								</a>
							</td>
							<td><?php echo $ret['Category']['name']; ?></td>
							<td>
								<span class="padding-small-left">
									<i class="icon-desktop"></i>
									<?php echo $video_status[$ret['status']]; ?>
								</span>
							</td>
							<td><?php echo date('Y-m-d H:i:s', $ret['create_time']); ?></td>
							<td>
								<a href="javascript:void(0);" onclick="zhuanma('{:U('Home/Videos/VideoZhuanma',array('id'=> $ret['video_id'],'video_sd_id'=> $ret['video_sd_id'], 'video_high_id'=> $ret['video_high_id'], 'video_super_id'=> $ret['video_super_id']))}','{$ret.video_title}');">
									<i class="icon-support (alias)"></i>
									查看转码
								</a>
								<a href="<?php echo U('Home/Videos/edit', array('id'=> $ret['video_id'],'hash'=> $ret['video_key'])); ?>">
									<i class="icon-pencil-square-o"></i>
									编 辑
								</a>
								<a href="<?php echo U('Home/Videos/del', array('id'=> $ret['video_id'],'hash'=> $ret['video_key'])); ?>">
									<i class="icon-times-circle-o"></i>
									删 除
								</a>
							</td>
						</tr>
					<?php endforeach; ?>
					<tr>
						<td colspan="5" align="center">{$page}</td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	/**
	 * [zhuanma 查询转码状态]
	 * @param  {[type]} path [description]
	 * @return {[type]}      [description]
	 */
	function zhuanma(path,title){
		$.getJSON(path,function(ret){
			var content = '---'+ret.video_sd_status.zhuanma_info+ '<br />---'+ret.video_high_status.zhuanma_info+'<br />---'+ret.video_super_status.zhuanma_info;
			//墨绿深蓝风
			layer.alert(content, {
				title : title,
				skin: 'layui-layer-molv' //样式类名
			  ,closeBtn: 0
			});
		});
	}
</script>
<include file="Public/Footer" />